<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>Document</title>

    <script !src="">
      'use strict';
      let map = new Map([
        ['key1', 'val1'],
        ['key2', 'val2'],
      ]);
      console.log(map);
      console.log('key1:' + map.get('key1'));
      ////新增或修改
      map.set('k', 'vl');

      console.log('has("key1")' + map.has('key1'));
      console.log('delete("key1")' + map.delete('key1'));
      console.log('has("key1")' + map.has('key1'));

      map.forEach((value, key, map) => {
        console.log(`foreach=k:${key}: val:${value}`);
      });
    </script>
  </head>
  <body></body>
</html>
